<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>科学上网 | linqinghuang</title>
  <meta name="keywords" content=" 科学上网 , v2ray , shadowsocks ">
  <meta name="description" content="科学上网 | linqinghuang">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="能力定位perf工具常用于性能优化">
<meta name="keywords" content="性能优化">
<meta property="og:type" content="article">
<meta property="og:title" content="perf使用">
<meta property="og:url" content="http:&#x2F;&#x2F;yoursite.com&#x2F;2020&#x2F;03&#x2F;11&#x2F;%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96&#x2F;perf%E4%BD%BF%E7%94%A8&#x2F;index.html">
<meta property="og:site_name" content="linqinghuang">
<meta property="og:description" content="能力定位perf工具常用于性能优化">
<meta property="og:locale" content="en">
<meta property="og:updated_time" content="2020-03-10T16:08:46.246Z">
<meta name="twitter:card" content="summary">


<link rel="icon" href="/img/lin.png">

<link href="/css/style.css?v=1.0.1" rel="stylesheet">

<link href="/css/hl_theme/sublime.css?v=1.0.1" rel="stylesheet">

<link href="//cdn.bootcss.com/animate.css/3.5.2/animate.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="/js/jquery.autocomplete.min.js?v=1.0.1" ></script>

<script src="//cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
<script>
    hljs.initHighlightingOnLoad();
</script>

<script src="//cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>



<script src="//cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js" ></script>

<script src="/js/iconfont.js?v=1.0.1" ></script>

</head>
<div style="display: none">
  <input class="theme_disqus_on" value="false">
  <input class="theme_preload_comment" value="false">
  <input class="theme_blog_path" value="">
</div>

<body>
<aside class="nav">
    <div class="nav-left">
        <a href="/" class="avatar_target">
    <img class="avatar" src="/img/lin.png" />
</a>
<div class="author">
    <span>linqinghuang</span>
</div>

<div class="icon">
    
</div>




<ul>
    <li><div class="all active">全部文章<small>(11)</small></div></li>
    
        
            
            <li><div data-rel="性能优化">性能优化<small>(1)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="程序编译调试">程序编译调试<small>(6)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="目标检测">目标检测<small>(1)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="计算机视觉"><i class="fold iconfont icon-right"></i>计算机视觉<small>(2)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="精度测量及优化">精度测量及优化<small>(1)</small></div>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
        
    
</ul>
<div class="left-bottom">
    <div class="menus">
    
    
    </div>
    <div><a class="about  site_url"  href="/about">关于</a></div>
</div>
<input type="hidden" id="yelog_site_posts_number" value="11">

<div style="display: none">
    <span id="busuanzi_value_site_uv"></span>
    <span id="busuanzi_value_site_pv"></span>
</div>

    </div>
    <div class="nav-right">
        <div class="friends-area">
    <div class="friends-title">
        友情链接
        <i class="back-title-list"></i>
    </div>
    <div class="friends-content">
        <ul>
            
        </ul>
    </div>
</div>
        <div class="title-list">
    <form onkeydown="if(event.keyCode==13){return false;}">
        <input class="search" type="text" placeholder="Search..." autocomplete="off"id="local-search-input" >
        <i class="cross"></i>
        <span>
            <label for="tagswitch">Tags:</label>
            <input id="tagswitch" type="checkbox" style="display: none" />
            <i id="tagsWitchIcon"></i>
        </span>
    </form>
    <div class="tags-list">
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color5">性能优化</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color5">科学上网</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color1">v2ray</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color2">shadowsocks</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color5">目标检测</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color2">object detection</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color1">computer vision</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color4">gdb</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color3">调试</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color4">gcc</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color3">编译</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color4">g++</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color5">精度测量</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" target="_blank" rel="noopener" class="color4">mAP</a>
    </li>
    
    <div class="clearfix"></div>
</div>

    
    <nav id="title-list-nav">
        
        <a  class="性能优化 "
           href="/2020/03/11/%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/perf%E4%BD%BF%E7%94%A8/"
           data-tag="性能优化"
           data-author="" >
            <span class="post-title" title="perf使用">perf使用</span>
            <span class="post-date" title="2020-03-11 00:08:00">2020/03/11</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2019/12/10/%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/"
           data-tag="科学上网,v2ray,shadowsocks"
           data-author="" >
            <span class="post-title" title="科学上网">科学上网</span>
            <span class="post-date" title="2019-12-10 00:11:00">2019/12/10</span>
        </a>
        
        <a  class="目标检测 "
           href="/2020/03/10/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/%E5%B8%B8%E8%A7%81%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B%E7%AE%97%E6%B3%95/"
           data-tag="目标检测"
           data-author="" >
            <span class="post-title" title="常见目标检测算法">常见目标检测算法</span>
            <span class="post-date" title="2020-03-10 00:13:00">2020/03/10</span>
        </a>
        
        <a  class=""
           href="/2020/02/04/caffe/caffe%E7%9A%84%E7%BC%96%E8%AF%91%E4%BD%93%E7%B3%BB/"
           data-tag=""
           data-author="" >
            <span class="post-title" title="caffe的Makefile编译体系">caffe的Makefile编译体系</span>
            <span class="post-date" title="2020-02-04 07:51:05">2020/02/04</span>
        </a>
        
        <a  class="计算机视觉 "
           href="/2020/03/28/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89%E5%8F%91%E5%B1%95%E5%8E%86%E5%8F%B2%E5%9B%9E%E9%A1%BE/"
           data-tag="object detection,computer vision"
           data-author="" >
            <span class="post-title" title="计算机视觉发展历史回顾">计算机视觉发展历史回顾</span>
            <span class="post-date" title="2020-03-28 22:09:00">2020/03/28</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/14/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/gdb%E8%BF%9B%E9%98%B6/"
           data-tag="gdb,调试"
           data-author="" >
            <span class="post-title" title="gdb进阶">gdb进阶</span>
            <span class="post-date" title="2020-03-14 23:41:00">2020/03/14</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/10/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/%E4%BD%8D%E7%BD%AE%E6%97%A0%E5%85%B3%E4%BB%A3%E7%A0%81PIC/"
           data-tag="gcc,编译"
           data-author="" >
            <span class="post-title" title="位置无关代码PIC">位置无关代码PIC</span>
            <span class="post-date" title="2020-03-10 23:41:00">2020/03/10</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/10/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/gdb%E5%9F%BA%E7%A1%80/"
           data-tag="gdb,调试"
           data-author="" >
            <span class="post-title" title="gcc和gdb基础">gcc和gdb基础</span>
            <span class="post-date" title="2020-03-10 23:41:00">2020/03/10</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/10/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/g++%E7%BC%96%E8%AF%91%E5%B8%B8%E8%A7%81%E7%9A%84%E7%BC%96%E8%AF%91%E5%8F%82%E6%95%B0/"
           data-tag="编译,g++"
           data-author="" >
            <span class="post-title" title="g++常见的编译参数">g++常见的编译参数</span>
            <span class="post-date" title="2020-03-10 23:41:00">2020/03/10</span>
        </a>
        
        <a  class="程序编译调试 "
           href="/2020/03/14/%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%B0%83%E8%AF%95/gdb%E4%BD%BF%E7%94%A8/gdb%E9%AB%98%E9%98%B6/"
           data-tag="gdb,调试"
           data-author="" >
            <span class="post-title" title="gdb高阶">gdb高阶</span>
            <span class="post-date" title="2020-03-14 23:41:00">2020/03/14</span>
        </a>
        
        <a  class="计算机视觉 精度测量及优化 "
           href="/2020/03/10/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/%E7%B2%BE%E5%BA%A6%E6%B5%8B%E9%87%8F%E5%8F%8A%E4%BC%98%E5%8C%96/mAP/"
           data-tag="目标检测,精度测量,mAP"
           data-author="" >
            <span class="post-title" title="mAP">mAP</span>
            <span class="post-date" title="2020-03-10 00:13:00">2020/03/10</span>
        </a>
        
    </nav>
</div>
    </div>
    <div class="hide-list">
        <div class="semicircle">
            <div class="brackets first"><</div>
            <div class="brackets">&gt;</div>
        </div>
    </div>
</aside>
<div class="post">
    <div class="pjax">
        <article id="post-科学上网/科学上网" class="article article-type-post" itemscope itemprop="blogPost">
    
        <h1 class="article-title">科学上网</h1>
    
    <div class="article-meta">
        
        
        
        <span class="book">
            
                <a href="javascript:" target="_blank" data-rel="程序编译调试 noopener">程序编译调试</a>
            
        </span>
        
        
        <span class="tag">
            
            <a href="javascript:" target="_blank" rel="noopener" class="color5">科学上网</a>
            
            <a href="javascript:" target="_blank" rel="noopener" class="color1">v2ray</a>
            
            <a href="javascript:" target="_blank" rel="noopener" class="color2">shadowsocks</a>
            
        </span>
        
    </div>
    <div class="article-meta">
        
        创建时间:<time class="date" title='更新时间: 2020-03-11 00:15:07'>2019-12-10 00:11</time>
        
    </div>
    <div class="article-meta">
        
        
        <span id="busuanzi_container_page_pv">
            阅读:<span id="busuanzi_value_page_pv">
                <span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </span>
        </span>
        
        
        <span class="top-comment" title="跳转至评论区">
            <a href="#comments">
                评论:<span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </a>
        </span>
        
    </div>
    
    <div class="toc-ref">
    
        <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#科学上网"><span class="toc-text">科学上网</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#1-什么是科学上网"><span class="toc-text">1 什么是科学上网</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-攻防历史"><span class="toc-text">2 攻防历史</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#2-1-史前时代"><span class="toc-text">2.1 史前时代</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#2-2-攻防战1-0"><span class="toc-text">2.2 攻防战1.0</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#2-3-攻防战2-0"><span class="toc-text">2.3 攻防战2.0</span></a></li></ol></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-什么是v2ray"><span class="toc-text">3 什么是v2ray</span></a></li></ol></li></ol>
    
<style>
    .left-col .switch-btn,
    .left-col .switch-area {
        display: none;
    }
    .toc-level-3 i,
    .toc-level-3 ol {
        display: none !important;
    }
</style>
</div>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="科学上网"><a href="#科学上网" class="headerlink" title="科学上网"></a>科学上网</h3><h4 id="1-什么是科学上网"><a href="#1-什么是科学上网" class="headerlink" title="1 什么是科学上网"></a>1 什么是科学上网</h4><p>在中国大陆从事计算机行业的，应该对这个概念不会陌生。多少时间浪费在这个上面。这个主要是GFW技术落后以及一些政策方面的原因，无法精准过滤<br>不合法规的内容，从而造成大范围无害中立的内容被屏蔽。科学上网则是用一些方法规避过滤，访问到真正的互联网，用于学习先进科学知识的手段。</p>
<h4 id="2-攻防历史"><a href="#2-攻防历史" class="headerlink" title="2 攻防历史"></a>2 攻防历史</h4><h5 id="2-1-史前时代"><a href="#2-1-史前时代" class="headerlink" title="2.1 史前时代"></a>2.1 史前时代</h5><p>早期的过滤手段大概是DNS投毒和IP黑名单。本人网龄不算太长，这个阶段具体是如何的不是非常清楚。大概是对特定的IP进行拉黑。比如对谷歌的IP拉黑。</p>
<h5 id="2-2-攻防战1-0"><a href="#2-2-攻防战1-0" class="headerlink" title="2.2 攻防战1.0"></a>2.2 攻防战1.0</h5><p>类似于12306的验证码攻防，过滤和反过滤也是攻防的双方。IP的封锁，没有挡住攻方多长时间。由于被封的IP是少数，而谷歌在全球有大量的IP，于是攻方<br>很快想出了修改hosts文件来制定IP地址的方法。也就是访问一些澳洲、南美之类的IP。速度虽然慢一些，但是总比无法访问要好得多。</p>
<p>针对这种情况，防守方很快就想出了策略。这次过滤不再简单针对IP，而是针对每一个出境的网络连接，都进行扫描。HTTP或是HTTPS这种协议只需要简单扫描<br>前几十个字节，就可以得到目标地址。在这种策略下，针对域名，只有不想封的，没有封不掉的。</p>
<p>直连不可能了，那么就只能考虑代理了。网络代理主要有三种模式：socks、HTTP和VPN。三种模式各有优缺点：</p>
<p>socks：可以代理TCP和UDP连接，但是数据包是非加密，无法逃过检测<br>http：可以进行tls加密，但是只能代理tcp，无法代理udp<br>vpn：可以代理tcp和udp连接，但是vpn会转发所有数据，在访问不需要出境的网站时，速度和延迟都会下降。</p>
<p>在这种困境下，Shadowssocks（下称ss）诞生了。这个软件目前在github上面是开源的，能够轻松找到大量的文档，甚至还有一键安装的脚本。服务端和客户端一应俱全。<br>客户端甚至覆盖所有主流平台，包括pc、mac、ios、Android。ss本质上还是socks的加密，但是能够对数据包进行加密，从而绕过检测。而且ss相较于传统的vpn代理，能够<br>判断数据是否需要出境，不需要出境则进行直连。比如访问国内的优酷哔哩哔哩等网站，就进行直连。</p>
<p>ss在github（<a href="https://github.com/shadowsocks/shadowsocks）" target="_blank" rel="noopener">https://github.com/shadowsocks/shadowsocks）</a> 上十分火爆，star的数量达到了32.2k。但是据传（以下消息不可靠）作者被请喝茶，于是现在只能看到<br>ss在github上面被移除了。</p>
<h5 id="2-3-攻防战2-0"><a href="#2-3-攻防战2-0" class="headerlink" title="2.3 攻防战2.0"></a>2.3 攻防战2.0</h5><p>从信息学的角度上面来讲，ss协议是几乎完美的一个协议，数据完全随机，无法100%判断出该数据包是否为ss。但从另一方面说，正常的网络访问数据并不是均匀分布的。HTTP<br>和HTTPS流量占据了70%以上。如果一个服务器接受的流量90%甚至100%是杂乱无章的，那它就很可疑了。虽然防守方无法100%确认就是ss，但是从工程策略的角度上讲，并不需要100%。<br>只要近似即可。</p>
<p>至此，出现了很多自行搭建的VPS直接被封IP的现象，一年50美刀左右的VPS直接作废，对个人来说还是有点肉疼的。到这里，攻方又想出了新策略。既然HTTP和HTTPS是主要数据，随机<br>数据又可疑，那么只要把数据伪装成HTTP或者HTTPS不就好了。</p>
<p>目前将加密的代理数据伪装成HTTP或者HTTPS的软件有v2ray+ws+tls，或者是使用trojan。这两个新软件目前仍然持续在开发和维护中。单纯的v2ray目前也能被检测到了，需要加上websocket<br>还有tls。trojan目前直接就可以伪装成HTTP或者HTTPS，trojan应该会是趋势。但是trojan目前尚年轻。本文先不介绍。这里重点讲解v2ray+websocket+tls的方式。</p>
<h4 id="3-什么是v2ray"><a href="#3-什么是v2ray" class="headerlink" title="3 什么是v2ray"></a>3 什么是v2ray</h4><p>v2ray是一个网络代理工具，代码在github上是开源的（<a href="https://github.com/v2ray/v2ray-core）" target="_blank" rel="noopener">https://github.com/v2ray/v2ray-core）</a> ，目前star数已经有26.6k了，代码还在持续更新中。这个star数量，想必你也猜到了，防守方也有检测的策略了。直接裸奔使用v2ray是不安全的。还需要在此基础之上再使用websocket和<br>tls进行伪装，伪装成http，以彻底避免被封IP的命运。</p>
<p>我家里的宽带是电信200M，这个是我看youtube的8k视频的效果。连接速度101774kbps，哈哈，很惊人吧！<br><img src="https://i.loli.net/2020/03/10/v1QBKxlDRfHVO9I.jpg" alt="youtube_8k.jpg"></p>

      
       <hr><span style="font-style: italic;color: gray;"> 转载请注明来源，欢迎对文章中的引用来源进行考证 </span>
    </div>
</article>



<div class="article_copyright">
    <p><span class="copy-title">文章标题:</span>科学上网</p>
    
    <p><span class="copy-title">本文作者:</span><a href="javascript:void(0)" target="_blank" rel="noopener" title="linqinghuang">linqinghuang</a></p>
    <p><span class="copy-title">发布时间:</span>2019-12-10, 00:11:00</p>
    <p><span class="copy-title">最后更新:</span>2020-03-11, 00:15:07</p>
    <span class="copy-title">原始链接:</span><a class="post-url" href="/2019/12/10/%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/" title="科学上网">http://yoursite.com/2019/12/10/%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/</a>
    <p>
        <span class="copy-title">版权声明:</span><i class="fa fa-creative-commons"></i> <a rel="license noopener" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" title="CC BY-NC-SA 4.0 International" target = "_blank">"署名-非商用-相同方式共享 4.0"</a> 转载请保留原文链接及作者。
    </p>
</div>



    <div id="comments"></div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">

<script type="text/javascript">
    $.getScript('/js/gitalk.js', function () {
        var gitalk = new Gitalk({
            clientID: '',
            clientSecret: '',
            repo: 'linqinghuang.github.io',
            owner: 'linqinghuang',
            admin: ['linqinghuang'],
            id: decodeURI(location.pathname),
            distractionFreeMode: 'true',
            language: 'zh-CN',
            perPage: parseInt('10',10)
        })
        gitalk.render('comments')
    })
</script>




    




    </div>
    <div class="copyright">
        <p class="footer-entry">© linqinghuang</p>
<p class="footer-entry">Built with <a href="https://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/yelog/hexo-theme-3-hexo" target="_blank">3-hexo</a> theme</p>

    </div>
    <div class="full-toc">
        <button class="full"><span class="min "></span></button>
<button class="post-toc-menu"><span class="post-toc-menu-icons"></span></button>
<div class="post-toc"><span class="post-toc-title">目录</span>
    <div class="post-toc-content">

    </div>
</div>
<a class="" id="rocket" href="javascript:void(0)" target="_blank" rel="noopener"></a>
    </div>
</div>
<div class="acParent"></div>

</body>
<script src="/js/jquery.pjax.js?v=1.0.1" ></script>

<script src="/js/script.js?v=1.0.1" ></script>
<script>
    var img_resize = 'default';
    /*作者、标签的自动补全*/
    $(function () {
        $('.search').AutoComplete({
            'data': ['#性能优化','#科学上网','#v2ray','#shadowsocks','#目标检测','#object detection','#computer vision','#gdb','#调试','#gcc','#编译','#g++','#精度测量','#mAP',],
            'itemHeight': 20,
            'width': 418
        }).AutoComplete('show');
    })
    function initArticle() {
        /*渲染对应的表格样式*/
        
            $(".post .pjax table").addClass("green_title");
        

        /*渲染打赏样式*/
        

        /*高亮代码块行号*/
        
        $('pre code').each(function(){
            var lines = $(this).text().split('\n').length - 1, widther='';
            if (lines>99) {
                widther = 'widther'
            }
            var $numbering = $('<ul/>').addClass('pre-numbering ' + widther).attr("unselectable","on");
            $(this).addClass('has-numbering ' + widther)
                    .parent()
                    .append($numbering);
            for(var i=1;i<=lines;i++){
                $numbering.append($('<li/>').text(i));
            }
        });
        

        /*访问数量*/
        
        $.getScript("//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");
        

        /*代码高亮，行号对齐*/
        $('.pre-numbering').css('line-height',$('.has-numbering').css('line-height'));

        
    }

    /*打赏页面隐藏与展示*/
    

</script>

<!--加入行号的高亮代码块样式-->

<style>
    pre{
        position: relative;
        margin-bottom: 24px;
        border-radius: 10px;
        border: 1px solid #e2dede;
        background: #FFF;
        overflow: hidden;
    }
    code.has-numbering{
        margin-left: 30px;
    }
    code.has-numbering.widther{
        margin-left: 35px;
    }
    .pre-numbering{
        margin: 0px;
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        padding: 0.5em 3px 0.7em 5px;
        border-right: 1px solid #C3CCD0;
        text-align: right;
        color: #AAA;
        background-color: ;
    }
    .pre-numbering.widther {
        width: 35px;
    }
</style>

<!--自定义样式设置-->
<style>
    
    
    .nav {
        width: 542px;
    }
    .nav.fullscreen {
        margin-left: -542px;
    }
    .nav-left {
        width: 120px;
    }
    
    
    @media screen and (max-width: 1468px) {
        .nav {
            width: 492px;
        }
        .nav.fullscreen {
            margin-left: -492px;
        }
        .nav-left {
            width: 100px;
        }
    }
    
    
    @media screen and (max-width: 1024px) {
        .nav {
            width: 492px;
            margin-left: -492px
        }
        .nav.fullscreen {
            margin-left: 0;
        }
        .nav .hide-list.fullscreen {
            left: 492px
        }
    }
    
    @media screen and (max-width: 426px) {
        .nav {
            width: 100%;
        }
        .nav-left {
            width: 100%;
        }
    }
    
    
    .nav-right .title-list nav a .post-title, .nav-right .title-list #local-search-result a .post-title {
        color: #383636;
    }
    
    
    .nav-right .title-list nav a .post-date, .nav-right .title-list #local-search-result a .post-date {
        color: #5e5e5f;
    }
    
    
    .nav-right nav a.hover, #local-search-result a.hover{
        background-color: #e2e0e0;
    }
    
    

    /*列表样式*/
    
    .post .pjax article .article-entry>ol, .post .pjax article .article-entry>ul, .post .pjax article>ol, .post .pjax article>ul{
        border: #e2dede solid 1px;
        border-radius: 10px;
        padding: 10px 32px 10px 56px;
    }
    .post .pjax article .article-entry li>ol, .post .pjax article .article-entry li>ul,.post .pjax article li>ol, .post .pjax article li>ul{
        padding-top: 5px;
        padding-bottom: 5px;
    }
    .post .pjax article .article-entry>ol>li, .post .pjax article .article-entry>ul>li,.post .pjax article>ol>li, .post .pjax article>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    .post .pjax article .article-entry li>ol>li, .post .pjax article .article-entry li>ul>li,.post .pjax article li>ol>li, .post .pjax article li>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    

    /* 背景图样式 */
    
    


    /*引用块样式*/
    

    /*文章列表背景图*/
    
    .nav-right:before {
        content: ' ';
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: 0.3;
        background: url("https://i.loli.net/2019/07/22/5d3521411f3f169375.png");
        background-repeat: no-repeat;
        background-position: 50% 0;
        -ms-background-size: cover;
        -o-background-size: cover;
        -moz-background-size: cover;
        -webkit-background-size: cover;
        background-size: cover;
    }
    

    
</style>







</html>
